---------------------
-- Robotic Panel   --
---------------------
-- A Cirr Creation --
---------------------
-- This file contains all the adjustable values for the panels,
-- and also some extra important values.
-- However, if the comments tell you not to adjust things,
-- THEN FOR THE LOVE OF GOD, DON'T ADJUST THEM.

--------------------------------------------------
-- ADJUSTABLE VALUES                            --
-- Feel free to tweak if needed                 --
-- (and you're sure you know what you're doing) --
--------------------------------------------------

-- Movement control.
Panels.HOVER_HEIGHT = 50 -- Height above the ground to hover
Panels.HOVER_DISPLACE = 5 -- Variation in hover height
Panels.PROPEL_SPEED = 100 -- The distance step to go forwards
Panels.TURN_STEP = 10 -- Angle to turn by and recheck if it's clear to move forwards

-- Population control.
Panels.MAX_PANELS = 20
Panels.BUILD_COST = 800

-- The start level of a panel is ALWAYS zero.
Panels.MAX_LEVELS = 3
Panels.LEVEL_MULTIPLIER = 1.5 -- More accurately the exponential base. Be very careful about changing this.

-- These are the base values that are multiplied by (level multiplier)^(panel's level)
Panels.HEALTH_MAX_BASE = 100
Panels.ENERGY_MAX_BASE = 100
Panels.BEAM_DAMAGE_BASE = 4 -- per second
Panels.UPGRADE_COST_BASE = 300

-- These are the costs per second in energy for sustained activities such as living and
-- beam firing.
Panels.LIFE_ENERGY_COST = 1
Panels.BEAM_ENERGY_COST = 2
Panels.REVIVE_ENERGY_COST = 3

-- These are the values that affected damage inflicted by panel death explosion.
Panels.DEATH_DAMAGE = 100 -- Damage inflicted at centre of explosion
Panels.DEATH_RADIUS = 100 -- Size of explosion

-- BEHAVIOURAL VALUES
-- These values are used to decide if it's time to switch to another behaviour.
Panels.TARGET_MAX_DISTANCE = 2000 -- Distance to search for a new target
Panels.IDLE_COLOR = Color(255, 255, 255, 255)

Panels.ATTACK_MAX_DISTANCE = 100 -- Distance to get close to target before firing with beam.
Panels.ATTACK_COLOR = Color(255, 0, 0, 255) -- Color to fade to if persuing this action

Panels.ENERGY_REPAIR_RATIO = 0.6 -- If energy falls below this ratio and not currently attacking, repair.
Panels.HEALTH_REPAIR_RATIO = 0.9 -- If CurrHealth falls below this ratio and not currently attacking, repair.
Panels.REPAIR_COLOR = Color(0, 0, 255, 255) -- Color to fade to if persuing this action

Panels.REVIVE_MAX_DISTANCE = 50 -- Distance to approach a fallen panel before reviving.
Panels.ENERGY_REVIVE_RATIO = 0.1 -- Stop reviving target panel once its energy is above this ratio, and reactivate it.
Panels.REVIVE_COLOR = Color(0, 255, 255, 255) -- Color to fade to if persuing this action

Panels.ENERGY_FLEE_RATIO = 0.2 -- If energy falls below this ratio, cancel current action and flee to the hills.
Panels.HEALTH_FLEE_RATIO = 0.4 -- If CurrHealth falls below this ratio, cancel current action and flee to the hills.
Panels.FLEE_MIN_DISTANCE = 600 -- Distance to flee from a target before it can be considered a safe distance.
Panels.FLEE_COLOR = Color(255, 255, 0, 255) -- Color to fade to if persuing this action

Panels.DecisionSounds = 
{
  Sound("panel/dec1.wav"),
  Sound("panel/dec2.wav"),
  Sound("panel/dec4.wav")
}

Panels.HitSounds = 
{
  Sound("panel/hit1.wav"),
  Sound("panel/hit2.wav"),
  Sound("panel/hit3.wav"),
  Sound("panel/hit4.wav")
}

Panels.ShieldSounds = 
{
  Sound("panel/shield1.wav"),
  Sound("panel/shield2.wav"),
  Sound("panel/shield3.wav")
}

Panels.AttackBeamSound = Sound("panel/beamattack.wav")
Panels.RepairBeamSound = Sound("panel/beamrepair.wav")
Panels.LiveSound = Sound("panel/alive.wav")
Panels.DieSound = Sound("panel/die.wav")

-----------------------------------
-- Required files! (DO NOT EDIT) --
-----------------------------------

resource.AddFile("models/XQM/panel1x1.mdl")
resource.AddFile("models/XQM/Panel1X1.phy")
resource.AddFile("models/XQM/panel1x1.vvd")
resource.AddFile("models/XQM/Panel1X1.dx80.vtx")
resource.AddFile("models/XQM/Panel1X1.dx90.vtx")
resource.AddFile("models/XQM/Panel1X1.sw.vtx")
resource.AddFile("models/XQM/Panel1X1.xbox.vtx")

resource.AddFile("models/XQM/boxfull.mdl")
resource.AddFile("models/XQM/BoxFull.phy")
resource.AddFile("models/XQM/boxfull.vvd")
resource.AddFile("models/XQM/BoxFull.dx80.vtx")
resource.AddFile("models/XQM/BoxFull.dx90.vtx")
resource.AddFile("models/XQM/BoxFull.sw.vtx")
resource.AddFile("models/XQM/BoxFull.xbox.vtx")

resource.AddFile("materials/models/XQM/boxfull_diffuse.vmt")
resource.AddFile("materials/models/XQM/BoxFull_diffuse.vtf")
resource.AddFile("materials/models/XQM/BoxFull_normal.vtf")
resource.AddFile("materials/models/Maratix/panel_diffuse.vmt")
resource.AddFile("materials/models/Maratix/Panel_diffuse.vtf")
resource.AddFile("materials/models/Maratix/Panel_normal.vtf")
resource.AddFile("materials/laser.vmt")
resource.AddFile("materials/laser.vtf")

resource.AddFile("sound/panel/dec1.wav")
resource.AddFile("sound/panel/dec2.wav")
resource.AddFile("sound/panel/dec4.wav")
resource.AddFile("sound/panel/hit1.wav")
resource.AddFile("sound/panel/hit2.wav")
resource.AddFile("sound/panel/hit3.wav")
resource.AddFile("sound/panel/hit4.wav")
resource.AddFile("sound/panel/shield1.wav")
resource.AddFile("sound/panel/shield2.wav")
resource.AddFile("sound/panel/shield3.wav")
resource.AddFile("sound/panel/beamattack.wav")
resource.AddFile("sound/panel/beamrepair.wav")
resource.AddFile("sound/panel/alive.wav")
resource.AddFile("sound/panel/die.wav")